Merge train: #9626 #9630 #9632 (+ manifest drift fix, red on main) - #9638
Merged
Conversation
added 6 commits
September 3, 2026 17:24
…nit caches stay in __bss Splitting a module into codegen units promoted every generated global to `linkonce_odr` so the linker could fold a global that more than one unit defines. Most globals are defined by exactly one unit, and the promotion is not free on Mach-O: `linkonce_odr` is weak-for-linker, and `TargetLoweringObjectFileMachO::SelectSectionForGlobal` routes every weak-for-linker global to the coalesced data section before it looks at whether the initializer is zero. A `zeroinitializer` global that would have gone to zerofill `__DATA,__bss` therefore lands in file-backed `__DATA,__data` and its zeros are written into the binary. Promote only the globals a link would actually see defined twice. ELF and COFF are unaffected: their BSS classification ignores linkage, and the non-Mach-O path already gives each global a single strong owner. Fixes #9610 Claude-Session: https://claude.ai/code/session_019iAdropXK3d2gyuGexbKMv
…fest has_receiver now matches the dispatch table (#9621 typo, red on main)
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lands #9626 (single-unit globals keep their own linkage so zero-init caches stay in
__bss), #9630 (SWC-backed Script-vs-Module detection replacing the byte-level ESM scanner, +133/-235) and #9632 (Bun project Node-API addon paths).Two fixes carried:
perry-codegen/src/module.rscrossed the 2000-line cap (fix(codegen): keep single-unit globals in their own linkage so zero-init caches stay in __bss (#9610) #9626 grew the linkage block by 165 lines); the 324-line linkage/symbol helper block moved tomodule/linkage.rs.bun::zstdDecompresswas declaredhas_receiver: truein API_MANIFEST butfalsein NATIVE_MODULE_TABLE — a typo in feat(bun): add CLI utility shim pack #9621 that had already reachedmainand was failingmanifest_consistency. The table is authoritative (it is a namespace function, not a receiver method), so the manifest row now matches. This is the class CLAUDE.md warns about:crates/*/tests/*.rsintegration suites only run per-PR when the diff names them, so it passed every gate on the way in.Validation:
run_lint_gates.shall 62 gates pass; release build green; RUST_TEST_THREADS=1 perry-runtime green; perry-parser + perry-codegen 0 failing suites (manifest_consistency now 5/5).Rebase-merge preserving authorship.